﻿@using Abp.Application.Services.Dto
@using Akso.Entities
@using Akso.Web.Areas.Mpa.Models.Common.Modals
@model Akso.Web.Areas.EduAdminModule.Models.Courses.CreateOrEditCourseModalViewModel
@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(Model.IsEditMode ? (L("Pages_EduAdminModule_Courses_Edit") + ": " + Model.Course.CourseName) : L("Pages_EduAdminModule_Courses_Create")))
<div class="modal-body">

    <form name="ObjectForm" role="form" novalidate class="form-validation">

        @if (Model.IsEditMode)
        {
            <input type="hidden" name="Id" value="@Model.Course.Id" />
        }

        <div class="row">
            <div class="col-sm-7">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="CourseName" id="CourseName" value="@Model.Course.CourseName" class="form-control edited" required maxlength="@CourseEntity.MaxNameLength" />
                    <label>@L("Page_EduAdminModule_Courses_GridColumn_CourseName")</label>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @*<input id="IsAutoCreateName" class="md-check" type="checkbox" name="IsAutoCreateName" value="true" @Html.Raw(Model.Course.IsAutoCreateName ? "1" : "checked=\"checked\"") />*@
                    
                    <div class="md-checkbox">
                        <input id="IsAutoCreateName" class="md-check" type="checkbox" name="IsAutoCreateName" value="@Model.Course.IsAutoCreateName" />
                        <label for="IsAutoCreateName">
                            <span class="inc"></span>
                            <span class="check"></span>
                            <span class="box"></span>
                            <label>@L("Page_EduAdminModule_Courses_GridColumn_AutoCreateName")</label>
                        </label>
                    </div>
                   
                </div>
            </div>

            <div class="col-sm-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.DropDownList("Years", Model.GetYearList, new { @class = "form-control edited" })
                    <label>@L("Page_EduAdminModule_Courses_GridColumn_Year")</label>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                   
                    @Html.DropDownList("PeriodGUID", Model.GetCourseTermList.Select(a=>a.ToSelectListItem()), new { @class = "form-control edited" })
                    <label>@L("Page_EduAdminModule_Courses_GridColumn_Period")</label>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.DropDownList("GradeGUID", Model.GetCourseGradeList.Select(a=>a.ToSelectListItem()), new { @class = "form-control edited" })
                    <label>@L("Page_EduAdminModule_Courses_GridColumn_Grade")</label>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.DropDownList("SubjectGUID",Model.GetCourseSubjectList.Select(a => a.ToSelectListItem()), new { @class = "form-control edited" })
                    <label>@L("Page_EduAdminModule_Courses_GridColumn_Subject")</label>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.DropDownList("SubjectTypeGUID", Model.GetCourseTypeList.Select(a => a.ToSelectListItem()), new { @class = "form-control edited" })
                    <label>@L("Page_EduAdminModule_Courses_GridColumn_SubjectType")</label>
               
                   
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                   1111111111111111111111111111
                </div>
            </div>
            
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.EnumDropDownListFor(x=>x.ChargeTypeList, new { @class = "form-control" })
                    <label>@L("Page_EduAdminModule_Courses_GridColumn_ChargeType")</label>
                </div>
            </div>

            <div class="col-sm-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                   
                    <div class="md-checkbox">
                        <input id="IsAnQi" class="md-check" type="checkbox" name="IsAnQi" value="@Model.Course.IsAnQi" />
                        <label for="IsAnQi">
                            <span class="inc"></span>
                            <span class="check"></span>
                            <span class="box"></span>
                            <label>@L("Page_EduAdminModule_Courses_GridColumn_IsAnQi")</label>
                        </label>
                        
                    </div>
                   
                        <input type="text" name="CourseName" id="CourseName" value="@Model.Course.CourseName" style="width:20px;" class="form-control edited" />
                   
                </div>
            </div>

        </div>

        <div class="row">
            <div class="col-sm-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="Price" value="@Model.Course.Price" class="form-control edited" required />
                    <label>@L("Page_EduAdminModule_Courses_GridColumn_Price")</label>
                    
                </div>
            </div>
            <div class="col-sm-5">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <div id="PriceUnits">元</div>
                </div>
                
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <select class="form-control edited" id="CourseTypeGuid" name="CourseTypeGuid">
                        <option value=""></option>
                        <option value="1">集体班</option>
                        <option value="2">一对一</option>
                        <option value="3">一对多(即1对2,1对3)</option>
                    </select>
                    <label>@L("Page_EduAdminModule_Courses_GridColumn_CourseType")</label>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <div class="md-checkbox">
                        <input id="IsDisable" class="md-check" type="checkbox" name="IsDisable" value="@Model.Course.IsDisable" />
                        <label for="IsDisable">
                            <span class="inc"></span>
                            <span class="check"></span>
                            <span class="box"></span>
                            <label>@L("Page_EduAdminModule_Courses_GridColumn_IsDisable")</label>
                        </label>
                    </div>
                    
                </div>
            </div>
            <div class="col-sm-12">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="Remark" value="@Model.Course.Remark" class="form-control edited" maxlength="@CourseEntity.MaxRemarkLength" />
                    <label>@L("Page_EduAdminModule_Courses_GridColumn_Remark")</label>
                </div>
            </div>
        </div>
       
    </form>

</div>

@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")
